package com.gzx.qc.modular.text.controller;

import com.gzx.qc.modular.text.service.GzxAsrVoiceTextService;
import com.gzx.qc.modular.text.vo.GzxAsrVoiceTextVo;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import vip.xiaonuo.common.pojo.CommonResult;

import java.util.List;

/**
 * @author xbl
 */
@RequiredArgsConstructor
@RestController
@RequestMapping("/asr/voice/text")
public class GzxVoiceTextController {

    private final GzxAsrVoiceTextService asrVoiceTextService;

    /**
     * 根据CallID获取asr通话文本
     */
    @GetMapping("/getTextByCallId/{callId}")
    public CommonResult<List<GzxAsrVoiceTextVo>> getTextByCallId(@PathVariable("callId") String callId) {
        return CommonResult.data(asrVoiceTextService.getTextByCallId(callId));
    }
}
